var windowName = "userVip";
var Page
apiready = function(){
    onWindowShow(function () {
    })
    onWindowHide(function () {
    })
    console.log("index page is OK");
    Page = createVM("#Page",{
        //页面数据
        month:"-"
        ,date:"数据获取中……"
    },{
        //页面方法
        "init":function () {
            getData(this)
        }
    })
    Page.init()
}

function getData(_this) {
    apiGet("/app/user/card",{},function (res) {
        logJson(res);
        if (isTrue(res.d.error)) {
            showToast("会员卡已过期");
            goback();
        }
        _this.month = res.d.month
        _this.date = res.d.date
    })
}